/*
 * @Description: 商品 模型
 * @Author: zhhuan
 * @LastEditTime: 2024-03-27 17:08:07
 */
const mongoose = require("../db/db")

const Schema = mongoose.Schema(
  {
    shopId: {
      type: String,
      require: true
    },
    name: String,
    imgUrl: String,
    sales: Number, //月售
    price: Number, //单价
    oldPrice: Number, //原价
    tabs: [String] //示例 tabs:['all','seckill']
  },
  { timestamps: true }
)
const Product = mongoose.model("product", Schema)

module.exports = Product
